<%@page import="articles.data.QnAPersistenceManager"%>
<%@page import="javax.jdo.PersistenceManager"%>
<%@page import="javax.jdo.JDOHelper"%>
<%@page import="java.util.List"%>
<%@page import="articles.model.Articles"%>
<%@page import="articles.string.Replace"%>
<%@page contentType="text/html;charset=UTF-8" language="java"%>
<%
List<Articles> listArticles = (List<Articles>) request.getAttribute("listArticles");
PersistenceManager psm = QnAPersistenceManager.get().getPersistenceManager();
%>
<html>
<body>
<ul>
					<%
						if(listArticles.size()>0)
						{
							for(int i=0;i<listArticles.size();i++)
							{
								Articles tmp = listArticles.get(i);
					%>
								<li>
									<a href="/article/<%=tmp.getAlias() %>" title="Article <%=Replace.remove(tmp.getTitle()) %>" class="title_articles"><%=tmp.getTitle() %></a>
								</li>
					<%
								tmp.setVodeNo(tmp.getVodeNo()+1);
								psm=JDOHelper.getPersistenceManager(tmp);
			 					psm.currentTransaction().begin();
			 					psm.makePersistent(tmp);
			 					psm.currentTransaction().commit();
							}
						}
					%>
				</ul>
</body>
</html>